
import { ref } from 'vue' 

const useIndex = () => {
    const currentIndex = ref(0)

    const handleItemClick = (index,url) => {
        currentIndex.value = index

        //_blank单独弹开窗口
        // window.open(url,'_blank','width=1300,height=800')

        window.myApi.open(url)
    }

    return {
        currentIndex,
        handleItemClick
    }

}

export default useIndex